import { http } from '@/utils/http'

// 获取问题区域列表
export const getProblemAreaList = () => {
  return http.get('/device/ems/mesIssueTracker/problemArea')
}

// 获取7s数据列表
export const getSevenSTroubleList = (params) => {
  return http.get('/device/ems/mesIssueTracker/list', params)
}

// 新增7sw问题
export const addSevenSTrouble = (data) => {
  return http.post('/device/ems/mesIssueTracker/insert', data)
}

// 修改7sw问题
export const updateSevenSTrouble = (data) => {
  return http.post('/device/ems/mesIssueTracker/edit', data)
}

// 获取7sw问题详情
export const getSevenSTroubleDetail = (params) => {
  return http.get('/device/ems/mesIssueTrackerDetail/list', params)
}

// 新增7sw问题详情
export const addSevenSTroubleDetail = (data) => {
  return http.post('/device/ems/mesIssueTrackerDetail/insert', data)
}

// 修改7sw问题详情
export const updateSevenSTroubleDetail = (data) => {
  return http.post('/device/ems/mesIssueTrackerDetail/edit', data)
}

// 确认指派人
export const confirmAssign = (data) => {
  return http.post('/device/ems/mesIssueTracker/assign', data)
}

// 确认上传问题图片
export const confirmUpload = (data) => {
  return http.post('/device/ems/mesIssueTracker/dataEntry', data)
}

// 改善确认
export const confirmImprove = (data) => {
  return http.post('/device/ems/mesIssueTracker/confirmCompletion', data)
}

// 判断有无新增权限
export const judgeAddPermission = () => {
  return http.post('/device/ems/mesIssueTracker/userInsert')
}

// 驳回问题
export const rejectTrouble = (data) => {
  return http.post('/device/ems/mesIssueTracker/confirmCompletion', data)
}
